<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
    <link rel="stylesheet" type="text/css" href="${path}/html/js/js-resource/imgPreview/css/style.css"/>
    <script type="text/javascript" src="${path}/html/js/jquery.form.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/uploadFile.js?v=<%out.print(Math.random());%>"></script>
    <script type="text/javascript" src="${path}/html/js/js-resource/imgPreview/js/lightBox.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/us/user/userInformationOption.js?v=<%out.print(Math.random());%>"></script>
</head>
<body>
<form id="operate_form" class="form" method="post" action="#" enctype="multipart/form-data" >
    <div class="formbody">
        <div class="formtitle" style="margin-top: 0px"><span>基本信息</span></div>
            <table align="center" width="50%" >
                <tr>
                    <td align="left" colspan="2" width="60">  <c:if test="${userInformation.commonFile.fileId!=null}">
                       <img  id="showImg" style="width:150px; height: 160px; margin-left: 58px;">
                    </c:if>
                        <c:if test="${userInformation.commonFile.fileId==null}">
                            <img id="showImg" style="width:150px; height: 160px; margin-left: 58px;" src="${path}/html/images/defaulPhoto/defaulPhoto.jpg" >
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <input type="hidden" name="companyId" id="companyId" value="${userInformation.companyId}">
                    <td align="right" width="60">所属公司：</td>
                    <td>${userInformation.company.name}</td>
                </tr>
                <tr>
                    <input type="hidden" name="emId" id="emId" value="${userInformation.emId}">
                    <td align="right" width="60">所属员工：</td>
                    <td>
                        <c:if test="${userInformation.employee.name==null}">
                            <span style="color: #b52b27">未设置所属员工</span>
                        </c:if>
                        <c:if test="${userInformation.employee.name!=null}">
                            ${userInformation.employee.name}
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <input type="hidden" name="usId" id="usId" value="${userInformation.usId}" />
                    <td align="right" width="60">登录名称：</td>
                    <td>${userInformation.loginName}</td>
                </tr>
                <tr>
                    <td align="right" width="60">用户手机：</td>
                    <td>
                        <input class="easyui-textbox" type="text" name="userPhone" data-options="prompt:'请输入用户手机'" id="userPhone" value="${userInformation.userPhone}" style="width:255px; height: 32px" validType="mobile"/>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="60"><span class="title" style="width:120px;">用户头像：</span></td>
                    <td>
                        <input class="easyui-filebox" id="uploadfile" name="uploadfile" data-options="buttonText:'选择头像',prompt:'请选择用户头像', onChange:function(){ $('#uploadBtn').linkbutton({ disabled:false }) }"  style="width:255px; height: 30px" /> <a id="uploadBtn" class="easyui-linkbutton" style="width:55px; height: 28px" > 上传 </a>
                        <!--以下属于上传附带参数-->
                        <input type="hidden" id="fileId" name="fileId" value="${userInformation.commonFile.fileId}" />
                        <input type="hidden" name="fkType" value="USERHEADIMG" />
                        <input type="hidden" name="modelName" value="用户板块" />
                        <input type="hidden" name="modelCode" value="US" />
                        <input type="hidden" name="funName" value="用户头像" />
                        <input type="hidden" name="funCode" value="userHeadImg" />
                        <input type="hidden" id="fileName" name="fileName" value="${userInformation.commonFile.name}">
                        <input type="hidden" id="url" name="url" value="${userInformation.commonFile.url}" />
                        <input type="hidden" id="size" name="size" />
                        <input type="hidden" id="fix" name="fix" />
                        <input type="hidden" id="md5" name="md5" />
                    </td>
                </tr>
                <tr>
                    <td align="right" width="60" valign="top">备注信息：</td>
                    <td valign="top">
                        <input class="easyui-textbox" name="remark" id="remark" data-options="multiline:true,prompt:'请输入用户信息'" value="${userInformation.remark}" style="width:255px;height:100px">
                    </td>
                </tr>
            </table>
        <div class="formtitle"><span>用户角色</span></div>
        <ul class="forminfo" style="padding-left: 125px">
                    <c:forEach items="${roleList}" var="role" >
                     <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon-man"></i>${role.name}</li>
                    </c:forEach>
        </ul>
    </div>
</form>
<div class="formbody" style="margin-left: 150px">
    <a id="optionUserInformation" class="easyui-linkbutton c1" style="width:100px; height: 35px">保存</a>
    &nbsp;&nbsp;&nbsp;
    <a id="exitUserInformation" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
</div>
</body>
<script>
        jQuery(document).ready(function($) {
            $.LightBox({speed:500});
        });
</script>
</html>